package component.entry{
    import flash.events.*;
    import org.pubflex.ModelUtility;
    import mx.containers.*;
    import mx.controls.*;

    
    public class CreateEntryFormBase extends Form{
    
        public function init(container:TabNavigator):void{
            var createNewEntryTab:VBox = new VBox();
    		createNewEntryTab.label = " New"; 
            //createNewEntryTab.addChild(container);				
    	    container.addChild(this);
    		container.selectedChild = this;
            
            // POST BUTTON
            var post:LinkButton = new LinkButton();
            post.label = "Publish";
            //post.toolTip = buildLink( collectionButton.data.@href ) ;
            trace(post.toolTip);
            //post.data = collectionButton.data;
            post.addEventListener(MouseEvent.CLICK, handlePostNewEntryEvent);
                    
            container.initialize();
            this.addChild(post);
                                    				
        }
                     
    
        public function handlePostNewEntryEvent(e:Event):void{            
               var xml:XML = ModelUtility.createNewEntry();
               trace(xml);
            }
    }
}